package com.perceptivesoftware.licensing.dao.generated;

import com.perceptivesoftware.licensing.domain.generated.*;
import java.sql.Timestamp;
import java.util.List;
import java.util.Set;

/**
 * Interface for TwRolevalDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

@SuppressWarnings("unused")
public interface ITwRolevalDAO
{
	/**
	 * Perform an initial save of a previously unsaved TwRoleval entity. All subsequent persist actions of this entity should use the #update() method. This
	 * operation must be performed within the a database transaction context for the entity's data to be permanently saved to the persistence store, i.e.,
	 * database. This method uses the {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * ITwRolevalDAO.save(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            TwRoleval entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(TwRoleval entity);

	/**
	 * Delete a persistent TwRoleval entity. This operation must be performed within the a database transaction context for the entity's data to be permanently
	 * deleted from the persistence store, i.e., database. This method uses the {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * ITwRolevalDAO.delete(entity);
	 * EntityManagerHelper.commit();
	 * entity = null;
	 * </pre>
	 * 
	 * @param entity
	 *            TwRoleval entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(TwRoleval entity);

	/**
	 * Persist a previously saved TwRoleval entity and return it or a copy of it to the sender. A copy of the TwRoleval entity parameter is returned when the
	 * JPA persistence mechanism has not previously been tracking the updated entity. This operation must be performed within the a database transaction context
	 * for the entity's data to be permanently saved to the persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * entity = ITwRolevalDAO.update(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            TwRoleval entity to update
	 * @returns TwRoleval the persisted TwRoleval entity instance, may not be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public TwRoleval update(TwRoleval entity);

	public TwRoleval findById(String id);

	/**
	 * Find all TwRoleval entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the TwRoleval property to query
	 * @param value
	 *            the property value to match
	 * @param rowStartIdxAndCount
	 *            Optional int varargs. rowStartIdxAndCount[0] specifies the the row index in the query result-set to begin collecting the results.
	 *            rowStartIdxAndCount[1] specifies the the maximum count of results to return.
	 * @return List<TwRoleval> found by query
	 */
	public List<TwRoleval> findByProperty(String propertyName, Object value, int... rowStartIdxAndCount);

	public List<TwRoleval> findByRolevalRoleName(Object rolevalRoleName, int... rowStartIdxAndCount);

	public List<TwRoleval> findByRolevalRoleDesc(Object rolevalRoleDesc, int... rowStartIdxAndCount);

	public List<TwRoleval> findByRolevalDeleted(Object rolevalDeleted, int... rowStartIdxAndCount);

	/**
	 * Find all TwRoleval entities.
	 * 
	 * @param rowStartIdxAndCount
	 *            Optional int varargs. rowStartIdxAndCount[0] specifies the the row index in the query result-set to begin collecting the results.
	 *            rowStartIdxAndCount[1] specifies the the maximum count of results to return.
	 * @return List<TwRoleval> all TwRoleval entities
	 */
	public List<TwRoleval> findAll(int... rowStartIdxAndCount);
}